package com.leenmvc.core.web.controller;

import com.leenmvc.core.annotation.ApiDescription;
import com.leenmvc.core.annotation.Note;
import com.leenmvc.core.base.BaseController;
import com.leenmvc.core.security.entity.core.SysApiParam;
import com.leenmvc.core.base.result.Result;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/3/6 11:17
 */
@RequestMapping("system/sysApiParam")
@RestController
@ApiDescription("接口参数控制器")
public class SysApiParamController extends BaseController<SysApiParam> {


    @GetMapping("getParamList")
    @RequiresPermissions("system:sysApiParam:getParamList")
    @Note("根据ApiId查询该Api所需要的参数列表")
    public Result getParamList(Long apiId) {
        List<Object> apiId1 = getList("apiId", apiId);
        return new Result().ok(apiId1);
    }

}
